package proxy4jdbc3.solutions;
import proxy4jdbc3.JDBCReporter;
import proxy4jdbc3.jdbc.DriverProxy;

public class MySQLDriverProxy extends DriverProxy {

	public MySQLDriverProxy() {//must have a default constructor
	}

	static {//must register the driver in DriverManager at load time
		register(new MySQLDriverProxy());
	}

	@Override
	public String getDriverClassName() {
		return "com.mysql.jdbc.Driver";
	}
	

	public JDBCReporter getReporter() {
		return new JDBCReporter() {
			public void reportUpdate(String sql) {
				System.out.println("MySQL Server updating... " + sql);
			}

			public void reportExecute(String sql) {
				System.out.println("MySQL Server executing... " + sql);
			}
			
			public void reportQuery(String sql) {
				System.out.println("MySQL Server querying... " + sql);
			}


		};
	}
	
	
}
